﻿
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- saved from url=(0014)about:internet -->
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:mssdk="winsdk" xmlns:script="urn:script" xmlns:build="urn:build" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="Description" content="Controlling Breakpoint Flags and Parameters"/>
<meta name="MSHAttr" content="PreferredSiteName:MSDN"/>
<meta name="MSHAttr" content="PreferredLib:/library/windows/hardware"/>
<title>Controlling Breakpoint Flags and Parameters</title>

<meta name="MS-HAID" content="Engine_DG_139ab0e2-36b9-463b-bfdd-05cd64791d4f.xml"/>


<link rel="STYLESHEET" type="text/css" HREF="../common/backsdk4.css"/>





<style>
html,div { margin: 0; padding: 0;}

body {
	padding: 0px;
	margin: 0px;
	overflow: auto;
	height: 100%;
}

#winchm_template_button{
	float: right;
	width: 93px;
	top: 7px;
	position: relative;
	text-align: right;
	right: 5px;
	height: auto;
}

#winchm_template_top{
	padding: 0px;
	margin: 0px;
	border-bottom: 1px solid #9B9B9B;
	background-color: #B1CEFE;
}

#winchm_template_navigation{
	margin: 0px;
	padding-top: 7px;
	padding-left: 7px;
	padding-bottom: 3px;
	padding-right: 0px;
	font-size: 8.5pt;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: normal;
	color: #585858;
}

#winchm_template_title{
	margin: 0px;
	padding-top: 4px;
	padding-left: 7px;
	padding-bottom: 7px;
	padding-right: 0px;
	font-size: 18px; 
	font-family: Verdana, Geneva, sans-serif;
	color: #363636;
}

#winchm_template_content{
	margin-top: 20px;
	margin-left: 15px;
	margin-bottom: 20px;
	margin-right: 15px;
	width: auto  !important;
	width: 100%;
}

#winchm_template_footer{
	border-width: 1px;
	border-color: #B1CEFE;
	border-top-style: solid;
	margin-top: 15px;
	margin-left: 15px;
	margin-bottom: 20px;
	margin-right: 15px;
	padding-top: 7px;
	padding-left: 0px;
	padding-bottom: 0px;
	padding-right: 0px;
	font-family: arial, helvetica, sans-serif;
	font-size: 8.5pt;
	color: #696969;
	width: auto;
	text-align: left;
}


#winchm_template_container{
	margin: 0px;
	padding: 0px;
	position: static;
	padding-bottom: 3px;
	overflow: auto;
	background-color: #FFFFFF;
}


@media print
{
#winchm_template_container{
	position: static;	
	margin: 0px;
	padding: 5px;
	
	width: auto;
	height: auto;
	overflow: auto;
}
#winchm_template_button{
visibility:hidden;
}
}

#winchm_template_navigation A:link	{text-decoration: none; color:#004080}
#winchm_template_navigation A:visited  {text-decoration: none; color: #004080}
#winchm_template_navigation A:active {text-decoration: none; color: #004080 }
#winchm_template_navigation A:hover {text-decoration: none;color: #0080FF}

A:link	{text-decoration: underline; color:#0033CC}
A:visited  {text-decoration: underline; color: #0033CC}
A:active {text-decoration: underline; color: #0033CC }
A:hover {text-decoration: underline;color: #FF0000;}
</style>
<script type="text/javascript">
function isMobile(){
Agent = window.navigator.userAgent;
if (Agent.indexOf("iPhone")>=1 || Agent.indexOf("iPad")>=1 || Agent.indexOf("iPod")>=1 || Agent.indexOf("Android")>=1){
return true;
}else{
return false;	
}

}
function d_onresize(){
if (window.navigator.userAgent.indexOf("MSIE")>=1){
document.getElementById('winchm_template_container').style.pixelWidth = document.body.offsetWidth - 3;
document.getElementById('winchm_template_container').style.pixelHeight = document.body.offsetHeight - document.getElementById('winchm_template_top').offsetHeight - 4;
}
document.getElementById('winchm_template_container').style.top = document.getElementById('winchm_template_top').offsetHeight + 'px';
}

function d_onbeforeprint(){
document.getElementById('winchm_template_container').style.width = 'auto';
document.getElementById('winchm_template_container').style.height = 'auto';
}

function d_onafterprint(){
d_onresize();
}

if(!isMobile()){

window.onload = d_onresize;
window.onresize = d_onresize;
window.onbeforeprint = d_onbeforeprint;
window.onafterprint = d_onafterprint;

document.write("<style>\n");
document.write("body {overflow: hidden;}\n");
document.write("#winchm_template_container {position: absolute;overflow: auto;top : 0px;right: 0px;bottom: 0px;left: 0px;}\n");
document.write("</style>\n");
}

</script>
</head>
<body><script language="JavaScript" type="text/JavaScript">
function syn(){
if(parent.nav.tree){
 if(parent.nav.tree.loaded){
  parent.nav.tree.selectNode(215);
 }else{
  setTimeout("syn()",500);
}
  }else{
  setTimeout("syn()",500);
  }}
if(parent!=self){
  setTimeout("syn()",100);
}else{
  parent.location.href = "../../index.htm?page=debugger/controlling_breakpoint_flags_and_parameters.htm";
}
originalOnload = window.onload;
if(originalOnload==null){
window.onload = function(){parent.contentLoaded = true;};
}else{
window.onload = function(){originalOnload();parent.contentLoaded = true;};
}
</script> 


<div id="winchm_template_top">
	<div id="winchm_template_button"><A href="setting_breakpoints.htm" title="Previous topic"><img id="winchm_template_prev" alt="Previous topic" src="../template2/btn_prev_n.gif" border="0"></a><A href="memory_access.htm" title="Next topic"><img id="winchm_template_next" alt="Next topic" src="../template2/btn_next_n.gif" border="0"></a></div>
	<div id="winchm_template_navigation">Help &gt; 
<A href="introduction6.htm">Debugging Tools for Windows (WinDbg, KD, CDB, NTSD)</A> &gt; <A href="debugging_resources.htm">Debugging Resources</A> &gt; <A href="debugger_engine_and_extension_apis.htm">Debugger Engine and Extension APIs</A> &gt; <A href="using_the_debugger_engine_api.htm">Using the Debugger Engine API</A> &gt; <A href="debugger_engine_api_overview.htm">Debugger Engine API Overview</A> &gt; <A href="using_breakpoints2.htm">Using Breakpoints</A> &gt; </div>
	<div id="winchm_template_title">Controlling Breakpoint Flags and Parameters</div>
</div>
<div id="winchm_template_container">
	<div id="winchm_template_content"><div id="mainSection"><p>There are a number of methods that can be used to determine basic information about breakpoints:</p>
<ul>
<li>
<p><a href="#Bookmark831"><b>GetId</b></a> returns the breakpoint ID.</p>
</li>
<li>
<p><a href="#Bookmark837"><b>GetType</b></a> returns the breakpoint type (software or processor) and the type of the effective processor on which the breakpoint is set.</p>
</li>
<li>
<p><a href="#Bookmark826"><b>GetAdder</b></a> returns the client that added the breakpoint.</p>
</li>
<li>
<p><a href="#Bookmark833"><b>GetOffset</b></a> returns the address of a breakpoint.</p>
</li>
<li>
<p><a href="#Bookmark834"><b>GetOffsetExpression</b></a> returns the expression string that specifies the location of the breakpoint.</p>
</li>
</ul>
<p>In addition to its location and breakpoint type, a breakpoint has several parameters controlling its behavior.</p>
<p>Breakpoint parameters can be controlled through a variety of specific methods. In addition, most of the parameters may be queried together using <a href="#Bookmark835"><b>GetParameters</b></a>.</p>
<h3><a id="breakpoint_flags"></a><a id="BREAKPOINT_FLAGS"></a>Breakpoint Flags</h3>
<p>Breakpoint flags are one kind of breakpoint parameters.</p>
<p>Breakpoint flags can be queried using <a href="#Bookmark830"><b>GetFlags</b></a>. They can be changed by using <a href="#Bookmark825"><b>AddFlags</b></a>, <a href="#Bookmark838"><b>RemoveFlags</b></a>, or <a href="#Bookmark841"><b>SetFlags</b></a>.</p>
<p>Breakpoint flags form a bit field.  The possible flags that can be used in this bit field, and their meanings, are as follows:</p>
<p></p>
<dl>
<dt><a id="DEBUG_BREAKPOINT_ENABLED"></a><a id="debug_breakpoint_enabled"></a>DEBUG_BREAKPOINT_ENABLED</dt>
<dd>
<p>When this flag is set, the breakpoint is <i>enabled</i> and will have its normal effect.  When this flag is not set, the breakpoint is <i>disabled</i> and will not have any effect.  If you wish to temporarily deactivate a breakpoint, you can remove this flag; it is then easy to add this flag back when you want to re-enable this breakpoint.</p>
</dd>
<dt><a id="DEBUG_BREAKPOINT_ADDER_ONLY"></a><a id="debug_breakpoint_adder_only"></a>DEBUG_BREAKPOINT_ADDER_ONLY</dt>
<dd>
<p>When this flag is set, the breakpoint is a <i>private breakpoint</i>.  This breakpoint is visible only to the client that added it.  In this case, other clients will not be able to query the engine for the breakpoint, and the engine will not send events generated by the breakpoint to other clients.  All callbacks (event and <a href="#Bookmark209">output</a>) related to this breakpoint will be sent only to this client.  See <a href="#Bookmark826"><b>GetAdder</b></a>.</p>
</dd>
<dt><a id="DEBUG_BREAKPOINT_GO_ONLY"></a><a id="debug_breakpoint_go_only"></a>DEBUG_BREAKPOINT_GO_ONLY</dt>
<dd>
<p>When this flag is set, the breakpoint will only be triggered if the target is in unrestricted execution.  It will not be triggered if the engine is stepping through instructions in the target.  </p>
</dd>
<dt><a id="DEBUG_BREAKPOINT_ONE_SHOT"></a><a id="debug_breakpoint_one_shot"></a>DEBUG_BREAKPOINT_ONE_SHOT</dt>
<dd>
<p>When this flag is set, the breakpoint will automatically remove itself the first time it is triggered.</p>
</dd>
<dt><a id="DEBUG_BREAKPOINT_DEFERRED"></a><a id="debug_breakpoint_deferred"></a>DEBUG_BREAKPOINT_DEFERRED</dt>
<dd>
<p>When this flag is set, the breakpoint is <i>deferred</i>. This flag is set by the engine when the offset of the breakpoint is specified using a symbolic expression, and the engine cannot evaluate the expression.  Every time a module is loaded or unleaded in the target, the engine will attempt reevaluate the expression for all breakpoints whose location is specified using an expression.  Those that cannot be evaluated are flagged as deferred.  <u>This flag cannot be modified by any client.</u></p>
</dd>
</dl>
<h3><a id="other_breakpoint_parameters"></a><a id="OTHER_BREAKPOINT_PARAMETERS"></a>Other Breakpoint Parameters</h3>
<p>Breakpoint parameters also include:</p>
<p></p>
<dl>
<dt><a id="Pass_count"></a><a id="pass_count"></a><a id="PASS_COUNT"></a><i>Pass count</i></dt>
<dd>
<p>If the breakpoint has a pass count associated with it, it will not be activated until the target has passed the breakpoint the specified number of times.  The pass count that was originally set can be found by using <a href="#Bookmark836"><b>GetPassCount</b></a>. The number of times remaining that the engine will pass the breakpoint before it is activated can be found using <a href="#Bookmark828"><b>GetCurrentPassCount</b></a>. The pass count can be reset to a new value by using <a href="#Bookmark845"><b>SetPassCount</b></a>.</p>
</dd>
<dt><a id="Match_thread"></a><a id="match_thread"></a><a id="MATCH_THREAD"></a><i>Match thread</i></dt>
<dd>
<p>If the breakpoint has a thread associated with it, it will be ignored by the engine when it is encountered by any other thread.  The thread can be found by using <a href="#Bookmark832"><b>GetMatchThreadId</b></a>, and can be changed by using <a href="#Bookmark842"><b>SetMatchThreadId</b></a>.</p>
</dd>
<dt><a id="Command"></a><a id="command"></a><a id="COMMAND"></a><i>Command</i></dt>
<dd>
<p>The breakpoint may have a command associated with it.  The command is executed when the breakpoint is activated.  This command can be found by using <a href="#Bookmark827"><b>GetCommand</b></a>, and can be changed by using <a href="#Bookmark839"><b>SetCommand</b></a>.</p>
</dd>
<dt><a id="Size"></a><a id="size"></a><a id="SIZE"></a><i>Size</i></dt>
<dd>
<p>If the breakpoint is a processor breakpoint, it must have a specified size.  This determines the size of the block of memory whose access will activate the breakpoint -- the beginning of the block is the breakpoint's location.  The size  can be found by using <a href="#Bookmark829"><b>GetDataParameters</b></a>, and can be changed by using <a href="#Bookmark840"><b>SetDataParameters</b></a>.</p>
</dd>
<dt><a id="Access_type"></a><a id="access_type"></a><a id="ACCESS_TYPE"></a><i>Access type</i></dt>
<dd>
<p>If the breakpoint is a processor breakpoint, it must have an access type.  This determines the type of access that will activate the breakpoint.  For example, the breakpoint may be activated if the target reads from, writes to, or executes the memory specified by the breakpoint.  The access type can be found by using <a href="#Bookmark829"><b>GetDataParameters</b></a>, and can be changed by using <a href="#Bookmark840"><b>SetDataParameters</b></a>.</p>
</dd>
</dl>
<h3><a id="valid_parameters_for_processor_breakpoints"></a><a id="VALID_PARAMETERS_FOR_PROCESSOR_BREAKPOINTS"></a>Valid Parameters for Processor Breakpoints</h3>
<p>The following access types are available for processor breakpoints:</p>
<table>
<tr>
<th>Value</th>
<th>Description</th>
</tr>
<tr>
<td>
<p>DEBUG_BREAK_READ</p>
</td>
<td>
<p>The breakpoint will be triggered when the CPU reads memory in the breakpoint's memory block.</p>
</td>
</tr>
<tr>
<td>
<p>DEBUG_BREAK_WRITE</p>
</td>
<td>
<p>The breakpoint will be triggered when the CPU writes memory in the breakpoint's memory block.</p>
</td>
</tr>
<tr>
<td>
<p>
<dl>
<dt>DEBUG_BREAK_READ</dt>
<dt>| DEBUG_BREAK_WRITE</dt>
</dl>
</p>
</td>
<td>
<p>The breakpoint will be triggered when the CPU reads or writes memory in the breakpoint's memory block.</p>
</td>
</tr>
<tr>
<td>
<p>DEBUG_BREAK_EXECUTE</p>
</td>
<td>
<p>The breakpoint will be triggered when the CPU fetches the instruction in the breakpoint's memory block.</p>
</td>
</tr>
<tr>
<td>
<p>DEBUG_BREAK_IO</p>
</td>
<td>
<p>The breakpoint will be triggered when the I/O port in the breakpoints memory block is accessed.  (Windows XP and Microsoft Windows Server 2003 only, kernel mode only, x86 only)</p>
</td>
</tr>
</table>
<p> </p>
<p>Not all access types and sizes are supported on all processors.  The following access types and sizes are supported:</p>
<p></p>
<dl>
<dt><a id="x86"></a><a id="X86"></a>x86</dt>
<dd>
<p>All access types are supported.  DEBUG_BREAK_READ behaves like DEBUG_BREAK_READ | DEBUG_BREAK_WRITE.  The size must be 1, 2, or 4.  The breakpoint's address must be a multiple of the size.</p>
</dd>
<dt><a id="x64"></a><a id="X64"></a>x64</dt>
<dd>
<p>All access types are supported.  DEBUG_BREAK_READ behaves like DEBUG_BREAK_READ | DEBUG_BREAK_WRITE.  The size must be 1, 2, 4, or 8.  The breakpoint's address must be a multiple of the size.</p>
</dd>
<dt><a id="Itanium"></a><a id="itanium"></a><a id="ITANIUM"></a>Itanium</dt>
<dd>
<p>All access types except DEBUG_BREAK_IO are supported.  The size must be a power of two; for DEBUG_BREAK_EXECUTE, the size must be 16.  The breakpoint's address must be a multiple of the size.</p>
</dd>
<dt><a id="Itanium_running_in_x86_mode"></a><a id="itanium_running_in_x86_mode"></a><a id="ITANIUM_RUNNING_IN_X86_MODE"></a>Itanium running in x86 mode</dt>
<dd>
<p>The is the same as for x86, except that DEBUG_BREAK_IO is not supported.</p></dd></dl></div></div>	
	<div id="winchm_template_footer">Copyright &copy; 2019. All rights 
reserved. (To change the copyright info, just edit it in template.)</div>
</div>

</body>
</html>
